<template>
  <footer class="footer">
    <div class="container">
      <div class="footer-content">
        <div class="copyright">
          <p>© {{ currentYear }} 余承东个人简历网站</p>
          <p>基于Vue 3 + Vite构建</p>
        </div>
        <div class="source">
          <p>数据来源：百度百科</p>
        </div>
      </div>
    </div>
  </footer>
</template>

<script setup>
import { computed } from 'vue'

const currentYear = computed(() => new Date().getFullYear())
</script>

<style scoped>
.footer {
  background-color: #f8f9fa;
  padding: 2rem 0;
  margin-top: 3rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copyright p, .source p {
  margin: 0.25rem 0;
  color: #6c757d;
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}
</style>
